apiready = function() {
seajs.use(["../../api", "../../jquery", "../../app","../../service"], function($api, $, app,service) {
    var vm = {
        el: '#app',
        data: {
          goods_number:3,
          page:1,
          TeamDetail:{},
          list:[]
        },
        mounted: function() {
          var that = this
            this.init()
            app.refreshHeaderInfo(function() {
                that.init();
            });
        },
        methods: {
            init: function() {
                var that = this;
                this.getTeamDetail()
                this.getTeamList()
                this.$nextTick(function(){
                  $('.con_').slideDown()
                })
            },
            // 获取下级列表
            getTeamList:function(){
              var that = this
              app.ajax(
                  service['getTeamList'], {
                      data: {
                          values: {
                            page:this.page
                          }
                      }
                  },
                  function(res) {
                      if (res.code == 0) {
                        if(that.page==1){
                          that.list = res.data
                        }
                      }
                  })
            },
            // 团队统计
            getTeamDetail:function(){
              var that = this
              app.ajax(
                  service['getTeamDetail'], {
                      data: {
                          values: {}
                      }
                  },
                  function(res) {
                      if (res.code == 0) {
                          that.TeamDetail = res.data
                      }
                  })
            },
            // 显示分类
            showClassify:function(){
              $('.shop_banner_head_right_classify').show(400)
            },
            // 隐藏分类
            hideClassify:function(){
              $('.shop_banner_head_right_classify').hide(400)
            },
            // 回到顶部
            toHead:function(){
              api.pageUp({
                  top: true
              })
            }
        }
    }
    var even = function() {}
    var newVue = new Vue(vm);
    even();
});
}
